<template>
    <div id="remark-info">
        <el-form label-width="100px">
            <el-form-item label="调整大类：">
                <el-select v-model="params.changeBigTypes_" placeholder="请输入" size="mini" @change="handleTextarea" style="margin-bottom: 20px">
                    <el-option v-for="(value, key) in Dict.ChangeBigType" :key="key" :label="value" :value="key"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="调整原因：">
                <el-input
                    type="textarea"
                    :rows="10"
                    :autosize="false"
                    placeholder="请输入备注"
                    maxlength="1000"
                    show-word-limit
                    v-model="params.adjustReason_"
                    @change="handleTextarea"
                    style="width: calc(100% - 60px); resize: none"
                >
                </el-input>
            </el-form-item>
        </el-form>
    </div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Watch, Emit } from 'vue-property-decorator';
import Dict from '@/project/cibfund/pages/compliance-source/dict/index';

@Component({ name: 'RemarkInfo', components: {} })
export default class RemarkInfo extends Vue {
    @Prop({ default: false }) showData: boolean;
    @Prop() entryControl!: any;
    Dict = new Dict();
    params: any = {
        changeBigTypes_: '',
        adjustReason_: '',
    };

    @Watch('entryControl', { immediate: true, deep: true })
    watchentryControl(newData) {
        if (newData.remarkInfo) {
            this.params = JSON.parse(JSON.stringify(newData.remarkInfo));
        }
    }

    /**
     * 文本域变更事件
     */
    @Emit('content-change')
    handleTextarea($event) {
        return this.params;
    }
}
</script>
<style lang="scss" scoped>
#remark-info {
    height: 100%;
    padding: 10px;
}
/deep/ .el-form .el-form-item__label {
    color: #333;
}
</style>
